package com.swh;

import com.swh.entity.User;
import com.swh.service.UserService;
import com.swh.service.impl.UserServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

/**
 * @Author: swh
 * @Description:
 * @Date: 2020/12/9 17:37
 * @Version: 1.0
 */
@RunWith(SpringRunner.class)
@ContextConfiguration("classpath:app.xml")
public class Demo1 {
    @Autowired
    private UserServiceImpl userService;

   @Test
    public void test1(){
       User id = userService.findById(2);
       System.out.println(id);

   }
}
